package com.xiaoshuidi.cloud.module.contract.enums.bill;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
@AllArgsConstructor
public enum OrderStatusEnum {

    OVERDUE("overdue", "已逾期"),
    RECEIVABLE("receivable", "应处理"),
    UNPAID("unpaid", "待处理"),
    IN_REVIEW("inReview", "审核中"),
    REJECT("reject", "已驳回"),
    PAID("paid", "已处理"),
    PROCESS("process", "处理中"),
    CANCEL("cancel", "已取消");

    private final String code;
    private final String msg;


    private static Map<String, OrderStatusEnum> enumMap = new HashMap<>();

    static {
        OrderStatusEnum[] values = OrderStatusEnum.values();
        for (OrderStatusEnum value : values) {
            enumMap.put(value.getCode(), value);
        }
    }
    public static OrderStatusEnum getEnum(String num){
        return enumMap.get(num);
    }


}
